<!-- 商品列表搜索框组件 -->
<template>
  <div class="search-item">
    <el-form
      :inline="true"
      :model="formInline"
      class="demo-form-inline"
      label-width="80px"
      size="medium"
    >
      <el-form-item label="所有分类">
        <el-select v-model="formInline.menu" placeholder="全部">
          <el-option v-for="(v,k) in allMenus" :label="v" :value="k" :key="k"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="商品名称">
        <el-input placeholder="请输入商品名称，关键字" v-model="formInline.txt"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary">搜索</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      formInline: {
        user: "",
        menu: "",
        txt: ""
      },
      allMenus: ["休闲食品", "干果干货", "豆制品类", "海鲜制品"]
    };
  },
};
</script>

<style scoped lang="less">
.search-item{
  background: #fff;
  padding-top: 25px;
  .el-form-item {
    margin-bottom: 5px;
}
}
</style>
